package com.ruoyi.common.core.domain;

import lombok.Data;

/**
 * 响应信息主体
 *
 * @author ruoyi
 */
@Data
public class R {
    private Integer code;
    private String msg;
    private Object data;

    public R() {

    }

    private R(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static R isOK(Object data) {
        return new R(200, "success", data);
    }

    public static R isFail(Integer code, String msg) {
        return new R(code, msg, null);
    }

}
